import request from '@/utils/request'

// 获取树状机构信息
export function getTreeApi() {
  return request({
    url: '/manager/business-hall/tree',
    method: 'get'
  })
}

// 获取机构详情
export function getorGanizationApi(id) {
  return request({
    url: `/manager/business-hall/${id}`,
    method: 'get'
  })
}

// 根据父id获取地址信息
export function getAreasApi(parentId) {
  return request({
    url: `/manager/areas/children`,
    method: 'get',
    params: {
      parentId
    }
  })
}
// 获取员工分页数据
export function getEmployeePageApi(params) {
  return request({
    url: `/manager/business-hall/user/page`,
    params
  })
}

// 获取快递员分页数据
export function getCourierPageApi(params) {
  return request({
    url: `/manager/business-hall/courier/page`,
    params
  })
}

// 根据机构查询快递员id
export function getCourierApi(agencyId) {
  return request({
    url: `/manager/business-hall/courier/findByAgencyId/${agencyId}`,
    method: 'get'
  })
}

// 获取快递员详情
export function getCourierDetailsApi(id) {
  return request({
    url: `/manager/business-hall/courier/${id}`,
    method: 'get'
  })
}

// 获取业务范围
export function getScopeApi(id) {
  return request({
    url: `/manager/business-hall/scope/${id}/1`,
    method: 'get'
  })
}

